/* eslint no-unused-vars:0 */
import React from 'react';
import 'antd/dist/antd.css';
import '../Questionnaire/index.less';
import questionnaireConfig from './../../../config/questionnaireConfig';
import { Row, Form, Radio, Checkbox, Card, Button } from 'antd';

import echarts from 'echarts/lib/echarts';
import 'echarts/lib/chart/bar';
import 'echarts/lib/chart/line';
import 'echarts/lib/chart/radar';
import 'echarts/lib/component/tooltip';
import 'echarts/lib/component/title';

export default class result extends React.Component {
    componentDidMount() {
        var myChart2 = echarts.init(document.getElementById('chart2'));

        myChart2.setOption({
            title: {
                text: '生源情况舆情分数历史趋势'
            },
            polar: [
                {
                    indicator: [
                        {
                            text: '学校环境',
                            max: 90
                        },
                        {
                            text: '生源情况',
                            max: 90
                        },
                        {
                            text: '师资建设',
                            max: 90
                        },
                        {
                            text: '校园管理',
                            max: 90
                        },
                        {
                            text: '教研成果',
                            max: 90
                        }
                    ]
                }
            ],
            series: [
                {
                    type: 'radar',
                    symbol: 'emptyCircle',
                    symbolSize: 0,
                    itemStyle: {
                        normal: {
                            color: 'rgba(255,84,84,0.8)',
                            areaStyle: {
                                color: 'rgba(255,84,84,0.8)'
                            }
                        }
                    },
                    data: [
                        {
                            // value: [90, 60, 30, 90, 60, 30]
                        }
                    ]
                }
            ]
        });
    }
    render() {
        return (
            <div className="body">
                <div
                    style={{
                        marginTop: '20px'
                    }}>
                    <span className="Customize-body">问卷调查</span>
                </div>
                <Card title="本次问卷调查结果">
                    <div
                        id="chart2"
                        style={{
                            marginTop: '0px',
                            width: 400,
                            height: 400
                        }}
                    />
                </Card>
            </div>
        );
    }
}
